import { service } from '@/service'
import { downloadBlob } from '../common'

// 新增人员批量
export function saveBatchThre(data: any) {
  return service.request({
    url: 'patrol/basicinfo/saveBatchThre',
    method: 'POST',
    data
  })
}

// 详情
export function basicDetailsportrait(id: any) {
  return service.request({
    url: 'patrol/basicinfo/portrait/' + id,
    method: 'GET'
  })
}

// 数据字典
export function getSelect(id: number) {
  return service.request({
    url: 'hbsys-system/sysParameter/select/infoList/' + id,
    method: 'GET'
  })
}
// 获取主列表
export function basicinfoPage(data: any) {
  return service.request({
    url: 'patrol/basicinfo/page',
    method: 'POST',
    data
  })
}
// 组队获取列表
export function basicinfoPageNode(data: any) {
  return service.request({
    url: 'patrol/basicinfo/pageNode',
    method: 'POST',
    data
  })
}

// 新增人员
export function basicinfoSave(data: any) {
  return service.request({
    url: 'patrol/basicinfo/save',
    method: 'POST',
    data
  })
}
// 删除人员
export function basicinfoDel(data: any) {
  return service.request({
    url: 'patrol/basicinfo/deleteBatch',
    method: 'DELETE',
    data
  })
}
// 人员详情
export function basicinfoInfo(id: any) {
  return service.request({
    url: 'patrol/basicinfo/info/' + id,
    method: 'GET'
  })
}

// 人员编辑
export function basicinfoUpdateDetails(data: any) {
  return service.request({
    url: 'patrol/basicinfo/updateDetails',
    method: 'PUT',
    data
  })
}

// 人员调动
export function basicinfoUpdatePost(data: any) {
  return service.request({
    url: 'patrol/basicinfo/updatePost',
    method: 'PUT',
    data
  })
}

// 批量导出
export function exportBaseExcel(params: any = {}, filename = '') {
  return downloadBlob(
    {
      url: 'patrol/basicinfo/baseExcel',
      method: 'GET',
      params
    },
    filename
  )
}

// 学习经历列表
export function studyexperiencePage(params: any) {
  return service.request({
    url: 'patrol/studyexperience/page',
    method: 'GET',
    params
  })
}

// 学习经历保存
export function studyexperienceSave(data: any) {
  return service.request({
    url: 'patrol/studyexperience/save',
    method: 'POST',
    data
  })
}

// 学习经历编辑
export function studyexperienceEdit(data: any) {
  return service.request({
    url: 'patrol/studyexperience/updateDetails',
    method: 'PUT',
    data
  })
}
// 学习经历删除
export function studyexperienceDel(data: any) {
  return service.request({
    url: 'patrol/studyexperience/deleteBatch',
    method: 'DELETE',
    data
  })
}

// 工作经历列表
export function workexperiencePage(params: any) {
  return service.request({
    url: 'patrol/workexperience/page',
    method: 'GET',
    params
  })
}

// 工作经历保存
export function workexperienceSave(data: any) {
  return service.request({
    url: 'patrol/workexperience/save',
    method: 'POST',
    data
  })
}

// 工作经历编辑
export function workexperienceEdit(data: any) {
  return service.request({
    url: 'patrol/workexperience/updateDetails',
    method: 'PUT',
    data
  })
}
// 工作经历删除
export function workexperienceDel(data: any) {
  return service.request({
    url: 'patrol/workexperience/deleteBatch',
    method: 'DELETE',
    data
  })
}

// 奖励情况列表
export function awardinfoPage(params: any) {
  return service.request({
    url: 'patrol/awardinfo/page',
    method: 'GET',
    params
  })
}

// 奖励情况保存
export function awardinfoSave(data: any) {
  return service.request({
    url: 'patrol/awardinfo/save',
    method: 'POST',
    data
  })
}

// 奖励情况编辑
export function awardinfoEdit(data: any) {
  return service.request({
    url: 'patrol/awardinfo/updateDetails',
    method: 'PUT',
    data
  })
}
// 奖励情况删除
export function awardinfoDel(data: any) {
  return service.request({
    url: 'patrol/awardinfo/deleteBatch',
    method: 'DELETE',
    data
  })
}

// 处分情况列表
export function penaltyinfoPage(params: any) {
  return service.request({
    url: 'patrol/penaltyinfo/page',
    method: 'GET',
    params
  })
}

// 处分情况保存
export function penaltyinfoSave(data: any) {
  return service.request({
    url: 'patrol/penaltyinfo/save',
    method: 'POST',
    data
  })
}

// 处分情况编辑
export function penaltyinfoEdit(data: any) {
  return service.request({
    url: 'patrol/penaltyinfo/updateDetails',
    method: 'PUT',
    data
  })
}
// 处分情况删除
export function penaltyinfoDel(data: any) {
  return service.request({
    url: 'patrol/penaltyinfo/deleteBatch',
    method: 'DELETE',
    data
  })
}

// 巡察经验列表
export function inspectionexperiencePage(params: any) {
  return service.request({
    url: 'patrol/inspectionexperience/page',
    method: 'GET',
    params
  })
}

// 巡察经验保存
export function inspectionexperienceSave(data: any) {
  return service.request({
    url: 'patrol/inspectionexperience/save',
    method: 'POST',
    data
  })
}

// 巡察经验编辑
export function inspectionexperienceEdit(data: any) {
  return service.request({
    url: 'patrol/inspectionexperience/updateDetails',
    method: 'PUT',
    data
  })
}
// 巡察经验删除
export function inspectionexperienceDel(data: any) {
  return service.request({
    url: 'patrol/inspectionexperience/deleteBatch',
    method: 'DELETE',
    data
  })
}

// 家庭及社会关系列表
export function familyrelationshipPage(params: any) {
  return service.request({
    url: 'patrol/familyrelationship/page',
    method: 'GET',
    params
  })
}

// 家庭及社会关系保存
export function familyrelationshipSave(data: any) {
  return service.request({
    url: 'patrol/familyrelationship/save',
    method: 'POST',
    data
  })
}

// 家庭及社会关系编辑
export function familyrelationshipEdit(data: any) {
  return service.request({
    url: 'patrol/familyrelationship/updateDetails',
    method: 'PUT',
    data
  })
}
// 家庭及社会关系删除
export function familyrelationshipDel(data: any) {
  return service.request({
    url: 'patrol/familyrelationship/deleteBatch',
    method: 'DELETE',
    data
  })
}

//年度考核列表/examineinfo/page
export function examineinfoPage(params: any) {
  return service.request({
    url: 'patrol/examineinfo/page',
    method: 'GET',
    params
  })
}

//年度考核保存 /examineinfo/save
export function examineinfoSave(data: any) {
  return service.request({
    url: 'patrol/examineinfo/save',
    method: 'POST',
    data
  })
}

//年度考核编辑
export function examineinfoEdit(data: any) {
  return service.request({
    url: 'patrol/examineinfo/updateDetails',
    method: 'PUT',
    data
  })
}

//年度考核删除 /examineinfo/deleteBatch
export function examineinfoDel(data: any) {
  return service.request({
    url: 'patrol/examineinfo/deleteBatch',
    method: 'DELETE',
    data
  })
}

// 人员画像
export function basicinfoPortrait(id: any) {
  return service.request({
    url: 'patrol/basicinfo/portrait/' + id,
    method: 'GET'
  })
}

//保存到推荐理由表表中 /recommendinfo/save
export function recommendinfoSave(data: any) {
  return service.request({
    url: 'patrol/recommendinfo/save',
    method: 'POST',
    data
  })
}

//修改推荐理由表详细信息 /recommendinfo/updateDetails
export function recommendinfoUpdateDetails(data: any) {
  return service.request({
    url: 'patrol/recommendinfo/updateDetails',
    method: 'PUT',
    data
  })
}
//根据ID获取推荐理由表详细信息 /recommendinfo/info/{id}
export function recommendinfoInfo(id: any) {
  return service.request({
    url: 'patrol/recommendinfo/info/' + id,
    method: 'GET'
  })
}

//版本列表
export function basicyearPage(params: any) {
  return service.request({
    url: 'patrol/basicyear/page',
    method: 'GET',
    params
  })
}
//版本保存 /basicyear/save
export function basicyearSave(data: any) {
  return service.request({
    url: 'patrol/basicyear/save',
    method: 'POST',
    data
  })
}
//版本编辑 /basicyear/updateDetails
export function basicyearUpdateDetails(data: any) {
  return service.request({
    url: 'patrol/basicyear/updateDetails',
    method: 'PUT',
    data
  })
}
//版本删除/basicyear/deleteBatch
export function basicyearDel(data: any) {
  return service.request({
    url: 'patrol/basicyear/deleteBatch',
    method: 'DELETE',
    data
  })
}
//状态 /basicyear/updateStatus
export function basicyearUpdateStatus(data: any) {
  return service.request({
    url: 'patrol/basicyear/updateStatus',
    method: 'PUT',
    data
  })
}
